import React, { useState } from "react";
import { Property_Tab,Property_Item } from "./style.js";
import {ComponentTitle} from '../../../assets/global-style'

const Property = (props) => {
  const { property } = props;
  return (
    <Property_Tab>
      <ComponentTitle>我的资产</ComponentTitle>
      <Property_Item>
        {property.map((item, index) => {
          return(
            <li className="property_item" 
            style={{backgroundColor:item.property_color,color:item.font_color,borderColor:item.property_color}} 
            key={index}>
            <div className="property_name">{item.property_name}</div>
            <div className="property_amount">{item.property_amount}</div>
          </li>
          )
        })}
      </Property_Item>
    </Property_Tab>
  );
};

export default Property;
